package org.eclipse.football;

import static org.junit.Assert.*;

import org.junit.Test;

public class DeleteTeam {

	@Test
	public void test() {
		// Create a league
		League league = new League("does_not_exist.txt");
		
		// Create a team 
		Team team = new Team("team", "user");
		
		// Add this team to the league
		league.addTeam(team);
		
		// Get the number of teams in the league
		int old_size = league.getTeams().size();
		
		// Try to delete this team from the league
		league.deleteTeam(team);
		
		// Make sure the size of the league has decreased by 1
		assertEquals(old_size - 1, league.getTeams().size());
	}

}
